//
// Created by root on 2020/5/7.
//

#include "JsonProtocol.h"

#include "nlohmann/json.hpp"

std::string CJsonProtocol::MakeChatMsg(const std::string &_sSendConnId, const std::string &_sRecieveConnId,
                                       const std::string &_sRoomId, const std::string &_sMsg) {
    nlohmann::json jsonObj;
    jsonObj["SendId"] = _sSendConnId;
    jsonObj["RecieveId"] = _sRecieveConnId;
    jsonObj["RoomId"] = _sRoomId;
    jsonObj["Msg"] = _sMsg;
    return jsonObj.dump();
}
